<?php
/**
 * Created by PhpStorm.
 * User: 11509
 * Date: 2021/3/16
 * Time: 14:48
 */

namespace app\admin\controller;

use app\admin\logic\Orderlogic;
use app\admin\model\Gorder;
use think\facade\Db;
use think\facade\Request;
use think\facade\View;

class Order
{

    // 订单表
    public function orderList()
    {
        // 接值
        $param=Request::param();
        // 留值
        $data = Orderlogic::setData($param);
        View::assign($data);
        // where 条件
        $where = Orderlogic::getWhere($param);
        // 查询数据
        $sel = Gorder::getOrderSel($where);
        // 查询订单状态数据
        $status = Gorder::getOrderStatus();
        // 渲染数据
        View::assign('sel',$sel);
        View::assign('status',$status);
        // 分页
        $page=$sel->render();
        View::assign('page',$page);

        return View::fetch();
    }


    public function orderDetail()
    {
        return View::fetch();
    }
}